package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum RewardTypeEnum {
    // 免单子类型 0 免单商品 1 晋级主席 2 省级代理免单 3 市级代理免单 4 区级代理免单
    SPU((byte) 0, "免单商品"),
    SHAREHOLDER_L4((byte) 1, "晋级董事奖励"),
    PROVINCE((byte) 2, "省级代理免单"),
    CITY((byte) 3, "市级代理免单"),
    AREA((byte) 4, "区级代理免单"),
    MEMBER_L4((byte) 5, "晋级总监奖励"),
    PARTNER_L4((byte) 6, "晋级总监奖励"),
    BOSS_L4((byte) 7, "晋级首席官奖励"),
    MEMBER_INVITE((byte) 8, "会员新人邀请奖励"),
    ;

    private Byte type;
    private String remark;

    RewardTypeEnum(Byte type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public static String getRemarkByType(Byte type) {
        for (RewardTypeEnum item : RewardTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item.getRemark();
            }
        }
        return "";
    }
}
